<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex align-stretch benben-position-layout flex myMoney_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub myMoney_fd0_0'>
          <view class='flex align-center myMoney_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  myMoney_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex align-center'>
            <text class='myMoney_fd0_0_c1_c0'>我的积分</text>
          </view>
          <view class='flex align-center justify-end myMoney_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---积分flex布局开始-->
      <view class="flex flex-direction align-stretch justify-center benben-flex-layout myMoney_flex_1">
        <view class='flex align-center justify-between myMoney_fd1_0'>
          <view class='flex flex-direction flex-wrap align-center'>
            <text class=' myMoney_fd1_0_c0_c0'>
              <text class=' myMoney_price1_fd1_0_c0_c0'>{{ dataDetails.user_money | frontPrice('万') }}</text>
              <text class=' myMoney_price1_fd1_0_c0_c0'>{{ dataDetails.user_money | laterPrice('万') }}</text>
            </text>
            <text class='myMoney_fd1_0_c0_c1'>我的积分</text>
          </view>

          <view class='flex  myMoney_fd1_0_c1'></view>

          <view class='flex flex-direction flex-wrap align-center'>
            <text class=' myMoney_fd1_0_c0_c0'>
              <text
                class=' myMoney_price1_fd1_0_c0_c0'>{{ dataDetails.total_revenue_money | frontPrice('万') }}</text>
              <text
                class=' myMoney_price1_fd1_0_c0_c0'>{{ dataDetails.total_revenue_money | laterPrice('万') }}</text>
            </text>
            <text class='myMoney_fd1_0_c0_c1'>累计获得</text>
          </view>
        </view>
      </view>

      <!---积分flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myMoney_flex_2">
        <view class='flex flex-wrap align-center myMoney_fd2_0'>
          <view class='flex flex-wrap align-center myMoney_fd2_0_c0'>
          </view>
          <text class='myMoney_fd2_0_c1'>近30天明细</text>
          <text class='myMoney_fd2_0_c2' @tap.stop="handleJumpDiy" data-type="navigateTo"
            :data-url="`/pages/my/balanceDetail/balanceDetail`">查看全部</text>
          <text class='fu-iconfont2  myMoney_fd2_0_c3'>&#xe7f2;</text>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch justify-between myMoney_fd2_1'>
          <view class='align-center'>
            <template v-for='(item,key0) in pointsList'>
              <view class='flex flex-wrap align-center flex-sub myMoney_fd2_1_c0_c0' :key='key0'>
                <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                  <text class='myMoney_fd2_1_c0_c0_c0_c0'>{{item.remark}}</text>
                  <text class='myMoney_fd2_1_c0_c0_c0_c1'>{{item.create_time}}</text>
                </view>
                <view class='flex flex-wrap align-center myMoney_fd2_1_c0_c0_c1'>
                  <text class='myMoney_fd2_1_c0_c0_c1_c0' v-if="item.change_type!='2'">+{{item.change_money}}</text><text
                    class='myMoney_fd2_1_c0_c0_c1_c0_1' v-if="item.change_type=='2'">{{item.change_money}}</text>
                </view>
              </view>
            </template>
            <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
              :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "Message": {
          "aid": "",
          "user_money": "",
          "freeze_money": "",
          "total_consumption_money": "",
          "total_consumption_virtual_money": "",
          "total_revenue_money": "",
          "total_revenue_virtual_money": "",
          "empirical": "",
          "score": "",
          "count_score": "",
          "commission": "",
          "total_order_commission_money": "",
          "withdrawal_money": "",
          "share_money": "",
          "discounts_money": "",
          "create_time": "",
          "user_id": ""
        },
        "dataList": [],
        "dataDetails": {
          "follow_count": "",
          "invite_code": "",
          "address": "",
          "address_code": "",
          "address_citycode": "",
          "id": "",
          "lastid": "",
          "user_nickname": "",
          "mobile": "",
          "user_name": "",
          "head_img": "",
          "birthday": "",
          "is_finger": "",
          "user_money": "",
          "freeze_money": "",
          "withdrawal_money": "",
          "score": "",
          "empirical": "",
          "invoice_title": "",
          "invoice_company_title": "",
          "total_consumption_money": "",
          "sex": "",
          "create_time": "",
          "phone": "",
          "online": "",
          "_mobile": "",
          "coupon": "",
          "age": "",
          "collection_count": "",
          "browse_count": "",
          "certified": "",
          "invite": [],
          "is_member": "",
          "expirationTime": "",
          "userlevel_id": "",
          "vip_last_time": ""
        },
        "pointsList": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getPointslistFunc()
      this.getMaberFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getPointslistFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取积分明细
      getPointslistFunc() {
        this.minixPagingListsApi = global.apiUrls.post5cc45422e5c87;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          change_type: '0',
          money_type: '0'
        }
        this.listData = [];
        this.pointsList = this.listData;
        this.pagingListToggle();
      },
      //获取会员信息
      async getMaberFunc() {
        //请求方法
        //数据验证

        let datadataDetails = await this.$api.post(global.apiUrls.post5c78c4772da97, {

        });

        if (datadataDetails.data.code != 1) {
          this.$message.info(datadataDetails.data.msg);
          return
        }
        let infodataDetails = datadataDetails.data;
        this.dataDetails = infodataDetails.data
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: var(--benbenbgColor1);
    background-size: 100% auto;
  }

  .myMoney_flex_0 {
    background: var(--benbenbgColor1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .myMoney_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .myMoney_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .myMoney_fd0_0_c0 {
    width: 180rpx;
  }

  .myMoney_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .myMoney_flex_1 {
    background: url(https://api.nongjugongxiang.com/nongju/images/62.png) no-repeat;
    margin: 36rpx 32rpx 0rpx 32rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    width: 686rpx;
    height: 206rpx;
    background-size: 100% auto;
  }

  .myMoney_fd1_0_c1 {
    background: var(--benbenbgColor1);
    width: 1rpx;
    height: 40rpx;
    margin: 0rpx 10rpx 0rpx 10rpx;
    transform: scaleX(0.5);
  }

  .myMoney_fd1_0_c0_c1 {
    color: #FFFFFF;
    font-size: 24rpx;
    font-weight: 400;
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .myMoney_price1_fd1_0_c0_c0 {
    font-size: 48rpx;
  }

  .myMoney_fd1_0_c0_c0 {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 48rpx;
  }

  .myMoney_fd1_0 {
    padding: 0rpx 103rpx 0rpx 103rpx;
  }

  .myMoney_flex_2 {
    background: transparent;
    background-size: 100% auto !important;
    padding: 40rpx 0rpx 0rpx 0rpx;
  }

  .myMoney_fd2_1_c0_c0_c1_c0_1 {
    padding: 0rpx 5rpx 0rpx 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: rgba(153, 153, 153, 1);
  }

  .myMoney_fd2_1_c0_c0_c1_c0 {
    padding: 0rpx 5rpx 0rpx 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: #E63838;
  }

  .myMoney_fd2_1_c0_c0_c1 {
    color: rgba(250, 32, 51, 1);
    font-weight: 500;
    font-size: 32rpx;
  }

  .myMoney_fd2_1_c0_c0_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #999999;
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .myMoney_fd2_1_c0_c0_c0_c0 {
    font-size: 28rpx;
    font-weight: 400;
    color: #333333;
    // width: 300rpx;
    padding: 0rpx 24rpx 0rpx 0rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .myMoney_fd2_1_c0_c0 {
    border-bottom: 1px solid rgba(238, 238, 238, 1);
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .myMoney_fd2_1 {
    background: #FFFFFF;
    background-size: 100% auto !important;
    margin: 0 32rpx 0rpx 32rpx;
  }

  .myMoney_fd2_0_c3 {
    margin: 0rpx 0rpx 0rpx 8rpx;
    color: var(--benbenFontColor2);
    font-size: 24rpx;
  }

  .myMoney_fd2_0_c2 {
    font-size: 28rpx;
    font-weight: 500;
    color: var(--benbenFontColor2);
    margin: 0rpx 0rpx 0rpx auto;
  }

  .myMoney_fd2_0_c1 {
    font-size: 28rpx;
    font-weight: 500;
    color: #333333;
  }

  .myMoney_fd2_0_c0 {
    background: #E63838;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    width: 5rpx;
    height: 32rpx;
    margin: 0rpx 8rpx 0rpx 0rpx;
  }

  .myMoney_fd2_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }
</style>
